package com.ybkj.daijia.api.weixin.handler;

import com.ybkj.daijia.api.weixin.entity.WxBaseMsgEntity;
import com.ybkj.daijia.api.weixin.entity.WxBaseRespEntity;
import java.util.Map;

public interface WxHandler {

    /**
     * 排序
     *
     * @return
     */
    Integer priority();

    /**
     * 处理消息
     *
     * @param msg
     * @param context
     * @return
     */
    public WxBaseRespEntity doHandle(WxBaseMsgEntity msg,
        Map<String, Object> context, WxBaseRespEntity resp);

    /**
     * 判断能否处理消息
     *
     * @param msg
     * @return
     */
    boolean canHandle(WxBaseMsgEntity msg);
}
